package com.yqg.education.mapper;

import com.yqg.education.controller.dto.TrainClassDTO;
import com.yqg.education.entity.TeachPlan;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 张芸博
 * @since 2025-04-10
 */
@Mapper
public interface TeachPlanMapper extends BaseMapper<TeachPlan> {

    List<TeachPlan> pageList(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("name") String name, Integer courseId);

    Long findCount(String name, Integer courseId);

    List<TeachPlan> findResourcePage(@Param("pageStartNumber") Integer pageStartNumber,
                                     @Param("pageSize") Integer pageSize,
                                     @Param("name") String name,
                                     @Param("typeId") Integer typeId,
                                     @Param("courseIds") List<Long> courseIds,
                                     @Param("userId") Integer userId,
                                     @Param("courseId") Integer courseId);

    Integer findResourcePageCount(@Param("name") String name,
                                  @Param("typeId") Integer typeId,
                                  @Param("courseIds") List<Long> courseIds,
                                  @Param("userId") Integer userId,
                                  @Param("courseId") Integer courseId);

    List<TeachPlan> getPdfData(List<Long> courseIds);
}
